package com.cg.configer;

import com.cg.Interector.LoginIntorector;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class IntorectorConfig implements WebMvcConfigurer {
    @Resource
    private LoginIntorector loginIntorector;
    public void addInterceptors(InterceptorRegistry registry)
    {
        registry.addInterceptor (loginIntorector).excludePathPatterns ("/login","/swagger-ui/**", "/v3/api-docs/**", "/swagger-resources/**", "/webjars/**")
                .addPathPatterns ("/**");
    }
}
